﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapObjectClassLibrary
{
    public class PointD
    {
        private double _X;
        private double _Y;

        public PointD() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="X">X坐标</param>
        /// <param name="Y">Y坐标</param>
        public PointD(double X, double Y)
        {
            _X = X;
            _Y = Y;
        }

        /// <summary>
        /// 获取和设置X坐标
        /// </summary>
        public double X
        {
            get { return _X; }
            set { _X = value; }
        }

        /// <summary>
        /// 获取和设置Y坐标
        /// </summary>
        public double Y
        {
            get { return _Y; }
            set { _Y = value; }
        }

        /// <summary>
        /// 复制对象
        /// </summary>
        /// <returns>新的相同的对象</returns>
        public PointD Clone()
        {
            PointD p = new PointD(this._X,this._Y);
            return p;
        }
    }
}
